
#include "Connect.h"
#include "WebServer.h"
#include <Arduino.h>
#include "MD5_String.h"


// 全局获取 LocalStorage 实例的快捷方式
//#define localstorage LocalStorage::getInstance()

WebServer server;  //创建服务器包括webSocket;
String test="hello word";
void setup() {
  // put your setup code here, to run once:
   

  //pinMode(LED_BUILTIN, OUTPUT);
  Serial.begin(9600);
  Serial.print("start");

  connect.connectWiFi();  //连接到指定的WiFi;
  //Led led(LED_BUILTIN);
  //led.openLED();
  server.begin();//启动网络服务器
   String md5str=md5_string((char*)test.c_str());//测试MD5
 
  Serial.println(md5str.c_str()); //测试MD5
}

void loop() {
  // put your main code here, to run repeatedly:
  //server.WScleanupClients();//清除最早连接默认esp32=32个,ESP8266;esp8266=8;
  // 获取当前时间
  server.WebSocketCleaner();
}
